//
// Created by liushuai on 12/18/19.
//
#include "swapNode.h"
ListNode *swapNode(ListNode *head) {
    ListNode* currentNode = head;
    if (head&&head->next) {
        int temp = head->val;
        head->val = head->next->val;
        head->next->val = temp;
        head = head->next;
        if (head->next)
            swapNode(head->next);
    }
    return currentNode;
}

